/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.worldscale.xp.wslib.im.jabber;

import org.w3c.dom.Element;

/**
 *
 * @author Kun
 */
public abstract class JabberMessageList {

    public abstract int size();

    public abstract Message item(int index);

    public abstract void add(Message msg);

    public abstract void add(Element stanza);

    public abstract JabberMessageList select(Filter filter);

    public abstract JabberID getLocalJID();

    public abstract static class Message {

        public abstract JabberID getRemoteJID();

        public abstract boolean isRx();

        public abstract boolean isTx();

        public abstract Element getStanza();

        public abstract String getBody();
    }

    public static interface Filter {

        boolean accept(Message msg);
    }
}
